#if _DEBUG

#include <cppunit/config/SourcePrefix.h>
#include "ParentTest.h"

void ParentTest::setUp()
{
}

void ParentTest::tearDown()
{
}

CPPUNIT_TEST_SUITE_REGISTRATION( ParentTest );

void ParentTest::testPreInsert()
{
	Parent parent;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	
	CPPUNIT_ASSERT(-1 == parent.GetParent(s7).statement_number);
	CPPUNIT_ASSERT(0 == parent.GetChild(s9).size());
}

void ParentTest::testGetChild()
{
	Parent parent;
	STMT s1;	s1.node_type=WHILE;		s1.statement_number = 1;
	STMT s2;	s2.node_type=IF;		s2.statement_number = 2;
	STMT s3;	s3.node_type=ASSIGN;	s3.statement_number = 3;
	STMT s4;	s4.node_type=IF;		s4.statement_number = 4;
	STMT s5;	s5.node_type=ASSIGN;	s5.statement_number = 5;
	STMT s6;	s6.node_type=ASSIGN;	s6.statement_number = 6;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s8;	s8.node_type=ASSIGN;	s8.statement_number = 8;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	STMT s10;	s10.node_type=IF;		s10.statement_number = 10;
	STMT s11;	s11.node_type=WHILE;	s11.statement_number = 11;
	STMT s12;	s12.node_type=ASSIGN;	s12.statement_number = 12;
	STMT s13;	s13.node_type=ASSIGN;	s13.statement_number = 13;
	STMT s14;	s14.node_type=ASSIGN;	s14.statement_number = 14;
	STMT s15;	s15.node_type=ASSIGN;	s15.statement_number = 15;
	STMT s16;	s16.node_type=ASSIGN;	s16.statement_number = 16;

	parent.InsertParent(s1,s2);
	parent.InsertParent(s1,s7);
	parent.InsertParent(s2,s3);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s4,s5);
	parent.InsertParent(s4,s6);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s7,s8);
	parent.InsertParent(s7,s9);
	parent.InsertParent(s9,s10);
	parent.InsertParent(s9,s15);
	parent.InsertParent(s9,s16);
	parent.InsertParent(s10,s11);
	parent.InsertParent(s10,s14);
	parent.InsertParent(s11,s12);
	parent.InsertParent(s11,s13);




	STMT_ARRAY children = parent.GetChild(s9);
	CPPUNIT_ASSERT(3 == children.size());
	
	auto it = children.find(s10);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 10);

	it = children.find(s15);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 15);

	it = children.find(s16);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 16);


	children = parent.GetChild(s1);
	CPPUNIT_ASSERT(2 == children.size());

	it = children.find(s2);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 2);
	
	it = children.find(s7);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 7);

	children = parent.GetChild(s5);
	CPPUNIT_ASSERT(0 == children.size());
}

void ParentTest::testGetParent()
{
	Parent parent;
	STMT s1;	s1.node_type=WHILE;		s1.statement_number = 1;
	STMT s2;	s2.node_type=IF;		s2.statement_number = 2;
	STMT s3;	s3.node_type=ASSIGN;	s3.statement_number = 3;
	STMT s4;	s4.node_type=IF;		s4.statement_number = 4;
	STMT s5;	s5.node_type=ASSIGN;	s5.statement_number = 5;
	STMT s6;	s6.node_type=ASSIGN;	s6.statement_number = 6;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s8;	s8.node_type=ASSIGN;	s8.statement_number = 8;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	STMT s10;	s10.node_type=IF;		s10.statement_number = 10;
	STMT s11;	s11.node_type=WHILE;	s11.statement_number = 11;
	STMT s12;	s12.node_type=ASSIGN;	s12.statement_number = 12;
	STMT s13;	s13.node_type=ASSIGN;	s13.statement_number = 13;
	STMT s14;	s14.node_type=ASSIGN;	s14.statement_number = 14;
	STMT s15;	s15.node_type=ASSIGN;	s15.statement_number = 15;
	STMT s16;	s16.node_type=ASSIGN;	s16.statement_number = 16;

	parent.InsertParent(s1,s2);
	parent.InsertParent(s1,s7);
	parent.InsertParent(s2,s3);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s4,s5);
	parent.InsertParent(s4,s6);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s7,s8);
	parent.InsertParent(s7,s9);
	parent.InsertParent(s9,s10);
	parent.InsertParent(s9,s15);
	parent.InsertParent(s9,s16);
	parent.InsertParent(s10,s11);
	parent.InsertParent(s10,s14);
	parent.InsertParent(s11,s12);
	parent.InsertParent(s11,s13);



	
	STMT p = parent.GetParent(s16);
	CPPUNIT_ASSERT(p.statement_number == 9 && p.node_type == IF);
	
	p = parent.GetParent(s10);
	CPPUNIT_ASSERT(p.statement_number == 9 && p.node_type == IF);
	
	p = parent.GetParent(s14);
	CPPUNIT_ASSERT(p.statement_number == 10 && p.node_type == IF);
	
	p = parent.GetParent(s12);
	CPPUNIT_ASSERT(p.statement_number == 11 && p.node_type == WHILE);
	
	p = parent.GetParent(s3);
	CPPUNIT_ASSERT(p.statement_number == 2 && p.node_type == IF);
	
	p = parent.GetParent(s1);
	CPPUNIT_ASSERT(p.statement_number == -1);
	
	p = parent.GetParent(s2);
	CPPUNIT_ASSERT(p.statement_number == 1 && p.node_type == WHILE);
	
	p = parent.GetParent(s7);
	CPPUNIT_ASSERT(p.statement_number == 1 && p.node_type == WHILE);
}

void ParentTest::testRetrieveTransitiveChild()
{
	Parent parent;
	STMT s1;	s1.node_type=WHILE;		s1.statement_number = 1;
	STMT s2;	s2.node_type=IF;		s2.statement_number = 2;
	STMT s3;	s3.node_type=ASSIGN;	s3.statement_number = 3;
	STMT s4;	s4.node_type=IF;		s4.statement_number = 4;
	STMT s5;	s5.node_type=ASSIGN;	s5.statement_number = 5;
	STMT s6;	s6.node_type=ASSIGN;	s6.statement_number = 6;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s8;	s8.node_type=ASSIGN;	s8.statement_number = 8;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	STMT s10;	s10.node_type=IF;		s10.statement_number = 10;
	STMT s11;	s11.node_type=WHILE;	s11.statement_number = 11;
	STMT s12;	s12.node_type=ASSIGN;	s12.statement_number = 12;
	STMT s13;	s13.node_type=ASSIGN;	s13.statement_number = 13;
	STMT s14;	s14.node_type=ASSIGN;	s14.statement_number = 14;
	STMT s15;	s15.node_type=ASSIGN;	s15.statement_number = 15;
	STMT s16;	s16.node_type=ASSIGN;	s16.statement_number = 16;

	parent.InsertParent(s1,s2);
	parent.InsertParent(s1,s7);
	parent.InsertParent(s2,s3);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s4,s5);
	parent.InsertParent(s4,s6);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s7,s8);
	parent.InsertParent(s7,s9);
	parent.InsertParent(s9,s10);
	parent.InsertParent(s9,s15);
	parent.InsertParent(s9,s16);
	parent.InsertParent(s10,s11);
	parent.InsertParent(s10,s14);
	parent.InsertParent(s11,s12);
	parent.InsertParent(s11,s13);





	STMT_ARRAY children = parent.RetrieveTransitiveChild(s9);
	CPPUNIT_ASSERT(7 == children.size());
	
	auto it = children.find(s10);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 10);
	it = children.find(s11);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 11);
	it = children.find(s12);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 12);
	it = children.find(s13);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 13);
	it = children.find(s14);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 14);
	it = children.find(s15);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 15);
	it = children.find(s16);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 16);



	children = parent.RetrieveTransitiveChild(s1);
	CPPUNIT_ASSERT(15 == children.size());

	it = children.find(s2);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 2);
	it = children.find(s3);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 3);
	it = children.find(s4);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 4);
	it = children.find(s5);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 5);
	it = children.find(s6);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 6);
	it = children.find(s7);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 7);
	it = children.find(s8);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 8);
	it = children.find(s9);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 9);
	it = children.find(s10);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 10);
	it = children.find(s11);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 11);
	it = children.find(s12);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 12);
	it = children.find(s13);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 13);
	it = children.find(s14);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 14);
	it = children.find(s15);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 15);
	it = children.find(s16);
	CPPUNIT_ASSERT(it->node_type == ASSIGN && it->statement_number == 16);



	
	children = parent.RetrieveTransitiveChild(s5);
	CPPUNIT_ASSERT(0 == children.size());
}

void ParentTest::testRetrieveTransitiveParent1()
{
	Parent parent;
	STMT s1;	s1.node_type=WHILE;		s1.statement_number = 1;
	STMT s2;	s2.node_type=IF;		s2.statement_number = 2;
	STMT s3;	s3.node_type=ASSIGN;	s3.statement_number = 3;
	STMT s4;	s4.node_type=IF;		s4.statement_number = 4;
	STMT s5;	s5.node_type=ASSIGN;	s5.statement_number = 5;
	STMT s6;	s6.node_type=ASSIGN;	s6.statement_number = 6;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s8;	s8.node_type=ASSIGN;	s8.statement_number = 8;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	STMT s10;	s10.node_type=IF;		s10.statement_number = 10;
	STMT s11;	s11.node_type=WHILE;	s11.statement_number = 11;
	STMT s12;	s12.node_type=ASSIGN;	s12.statement_number = 12;
	STMT s13;	s13.node_type=ASSIGN;	s13.statement_number = 13;
	STMT s14;	s14.node_type=ASSIGN;	s14.statement_number = 14;
	STMT s15;	s15.node_type=ASSIGN;	s15.statement_number = 15;
	STMT s16;	s16.node_type=ASSIGN;	s16.statement_number = 16;

	parent.InsertParent(s1,s2);
	parent.InsertParent(s1,s7);
	parent.InsertParent(s2,s3);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s4,s5);
	parent.InsertParent(s4,s6);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s7,s8);
	parent.InsertParent(s7,s9);
	parent.InsertParent(s9,s10);
	parent.InsertParent(s9,s15);
	parent.InsertParent(s9,s16);
	parent.InsertParent(s10,s11);
	parent.InsertParent(s10,s14);
	parent.InsertParent(s11,s12);
	parent.InsertParent(s11,s13);



	STMT_ARRAY pp = parent.RetrieveTransitiveParent(s12);
	CPPUNIT_ASSERT(5 == pp.size());

	auto it = pp.find(s1);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 1);
	it = pp.find(s7);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 7);
	it = pp.find(s9);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 9);
	it = pp.find(s10);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 10);
	it = pp.find(s11);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 11);


	pp = parent.RetrieveTransitiveParent(s5);
	CPPUNIT_ASSERT(3 == pp.size());

	it = pp.find(s1);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 1);
	it = pp.find(s2);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 2);
	it = pp.find(s4);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 4);
	

	pp = parent.RetrieveTransitiveParent(s1);
	CPPUNIT_ASSERT(0 == pp.size());
}

void ParentTest::testRetrieveTransitiveParent2()
{
	Parent parent;
	STMT s1;	s1.node_type=WHILE;		s1.statement_number = 1;
	STMT s2;	s2.node_type=IF;		s2.statement_number = 2;
	STMT s3;	s3.node_type=ASSIGN;	s3.statement_number = 3;
	STMT s4;	s4.node_type=IF;		s4.statement_number = 4;
	STMT s5;	s5.node_type=ASSIGN;	s5.statement_number = 5;
	STMT s6;	s6.node_type=ASSIGN;	s6.statement_number = 6;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s8;	s8.node_type=ASSIGN;	s8.statement_number = 8;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	STMT s10;	s10.node_type=IF;		s10.statement_number = 10;
	STMT s11;	s11.node_type=WHILE;	s11.statement_number = 11;
	STMT s12;	s12.node_type=ASSIGN;	s12.statement_number = 12;
	STMT s13;	s13.node_type=ASSIGN;	s13.statement_number = 13;
	STMT s14;	s14.node_type=ASSIGN;	s14.statement_number = 14;
	STMT s15;	s15.node_type=ASSIGN;	s15.statement_number = 15;
	STMT s16;	s16.node_type=ASSIGN;	s16.statement_number = 16;

	parent.InsertParent(s1,s2);
	parent.InsertParent(s1,s7);
	parent.InsertParent(s2,s3);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s4,s5);
	parent.InsertParent(s4,s6);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s7,s8);
	parent.InsertParent(s7,s9);
	parent.InsertParent(s9,s10);
	parent.InsertParent(s9,s15);
	parent.InsertParent(s9,s16);
	parent.InsertParent(s10,s11);
	parent.InsertParent(s10,s14);
	parent.InsertParent(s11,s12);
	parent.InsertParent(s11,s13);




	STMT_ARRAY pp = parent.RetrieveTransitiveParent(s13, WHILE);
	CPPUNIT_ASSERT(3 == pp.size());

	auto it = pp.find(s1);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 1);
	it = pp.find(s7);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 7);
	it = pp.find(s11);
	CPPUNIT_ASSERT(it->node_type == WHILE && it->statement_number == 11);


	pp = parent.RetrieveTransitiveParent(s13, IF);
	CPPUNIT_ASSERT(2 == pp.size());

	it = pp.find(s9);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 9);
	it = pp.find(s10);
	CPPUNIT_ASSERT(it->node_type == IF && it->statement_number == 10);
}


/*
void ParentTest::testRetrieveTransitiveParent()
{
	Parent parent;
	STMT s1;	s1.node_type=WHILE;		s1.statement_number = 1;
	STMT s2;	s2.node_type=IF;		s2.statement_number = 2;
	STMT s3;	s3.node_type=ASSIGN;	s3.statement_number = 3;
	STMT s4;	s4.node_type=IF;		s4.statement_number = 4;
	STMT s5;	s5.node_type=ASSIGN;	s5.statement_number = 5;
	STMT s6;	s6.node_type=ASSIGN;	s6.statement_number = 6;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s8;	s8.node_type=ASSIGN;	s8.statement_number = 8;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	STMT s10;	s10.node_type=IF;		s10.statement_number = 10;
	STMT s11;	s11.node_type=WHILE;	s11.statement_number = 11;
	STMT s12;	s12.node_type=ASSIGN;	s12.statement_number = 12;
	STMT s13;	s13.node_type=ASSIGN;	s13.statement_number = 13;
	STMT s14;	s14.node_type=ASSIGN;	s14.statement_number = 14;
	STMT s15;	s15.node_type=ASSIGN;	s15.statement_number = 15;
	STMT s16;	s16.node_type=ASSIGN;	s16.statement_number = 16;

	parent.InsertParent(s1,s2);
	parent.InsertParent(s1,s7);
	parent.InsertParent(s2,s3);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s4,s5);
	parent.InsertParent(s4,s6);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s7,s8);
	parent.InsertParent(s7,s9);
	parent.InsertParent(s9,s10);
	parent.InsertParent(s9,s15);
	parent.InsertParent(s9,s16);
	parent.InsertParent(s10,s11);
	parent.InsertParent(s10,s14);
	parent.InsertParent(s11,s12);
	parent.InsertParent(s11,s13);


	int in_array[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
	//int in_array2[] = {10,11,12,13,14,15,16,17,18,19,20};
	std::vector<INTEGER> in (in_array, in_array + sizeof(in_array) / sizeof(INTEGER) );
	//std::vector<INTEGER> in2 (in_array2, in_array2 + sizeof(in_array2) / sizeof(INTEGER) );
	std::vector<std::vector<INTEGER>> out = parent.RetrieveTransitiveParent(in,in);

	CPPUNIT_ASSERT(out[0][0]==1 && out[1][0]==2);
	CPPUNIT_ASSERT(out[0][1]==1 && out[1][1]==3);
	CPPUNIT_ASSERT(out[0][2]==1 && out[1][2]==4);
	CPPUNIT_ASSERT(out[0][3]==1 && out[1][3]==5);
	CPPUNIT_ASSERT(out[0][4]==1 && out[1][4]==6);
	CPPUNIT_ASSERT(out[0][5]==1 && out[1][5]==7);
	CPPUNIT_ASSERT(out[0][6]==1 && out[1][6]==8);
	CPPUNIT_ASSERT(out[0][7]==1 && out[1][7]==9);
	CPPUNIT_ASSERT(out[0][8]==1 && out[1][8]==10);
	CPPUNIT_ASSERT(out[0][9]==1 && out[1][9]==11);
	CPPUNIT_ASSERT(out[0][10]==1 && out[1][10]==12);
	CPPUNIT_ASSERT(out[0][11]==1 && out[1][11]==13);
	CPPUNIT_ASSERT(out[0][12]==1 && out[1][12]==14);
	CPPUNIT_ASSERT(out[0][13]==1 && out[1][13]==15);
	CPPUNIT_ASSERT(out[0][14]==1 && out[1][14]==16);

	CPPUNIT_ASSERT(out[0][15]==2 && out[1][15]==3);
	CPPUNIT_ASSERT(out[0][16]==2 && out[1][16]==4);
	CPPUNIT_ASSERT(out[0][17]==2 && out[1][17]==5);
	CPPUNIT_ASSERT(out[0][18]==2 && out[1][18]==6);

	CPPUNIT_ASSERT(out[0][19]==4 && out[1][19]==5);
	CPPUNIT_ASSERT(out[0][20]==4 && out[1][20]==6);

	CPPUNIT_ASSERT(out[0][21]==7 && out[1][21]==8);
	CPPUNIT_ASSERT(out[0][22]==7 && out[1][22]==9);
	CPPUNIT_ASSERT(out[0][23]==7 && out[1][23]==10);
	CPPUNIT_ASSERT(out[0][24]==7 && out[1][24]==11);
	CPPUNIT_ASSERT(out[0][25]==7 && out[1][25]==12);
	CPPUNIT_ASSERT(out[0][26]==7 && out[1][26]==13);
	CPPUNIT_ASSERT(out[0][27]==7 && out[1][27]==14);
	CPPUNIT_ASSERT(out[0][28]==7 && out[1][28]==15);
	CPPUNIT_ASSERT(out[0][29]==7 && out[1][29]==16);

	CPPUNIT_ASSERT(out[0][30]==9 && out[1][30]==10);
	CPPUNIT_ASSERT(out[0][31]==9 && out[1][31]==11);
	CPPUNIT_ASSERT(out[0][32]==9 && out[1][32]==12);
	CPPUNIT_ASSERT(out[0][33]==9 && out[1][33]==13);
	CPPUNIT_ASSERT(out[0][34]==9 && out[1][34]==14);
	CPPUNIT_ASSERT(out[0][35]==9 && out[1][35]==15);
	CPPUNIT_ASSERT(out[0][36]==9 && out[1][36]==16);

	CPPUNIT_ASSERT(out[0][37]==10 && out[1][37]==11);
	CPPUNIT_ASSERT(out[0][38]==10 && out[1][38]==12);
	CPPUNIT_ASSERT(out[0][39]==10 && out[1][39]==13);
	CPPUNIT_ASSERT(out[0][40]==10 && out[1][40]==14);
	CPPUNIT_ASSERT(out[0][41]==11 && out[1][41]==12);
	CPPUNIT_ASSERT(out[0][42]==11 && out[1][42]==13);

	/*
	cout << "Parent*(s1,s2)" << 
		out[0].size() << ", " << out[1].size() << endl;

	unsigned int i;
	for (i = 0; i < out[0].size() ; i++)
	{
		cout << out[0][i] << ", " << out[1][i] << endl;
	}
}

void ParentTest::testRetrieveParent()
{
	Parent parent;
	STMT s1;	s1.node_type=WHILE;		s1.statement_number = 1;
	STMT s2;	s2.node_type=IF;		s2.statement_number = 2;
	STMT s3;	s3.node_type=ASSIGN;	s3.statement_number = 3;
	STMT s4;	s4.node_type=IF;		s4.statement_number = 4;
	STMT s5;	s5.node_type=ASSIGN;	s5.statement_number = 5;
	STMT s6;	s6.node_type=ASSIGN;	s6.statement_number = 6;
	STMT s7;	s7.node_type=WHILE;		s7.statement_number = 7;
	STMT s8;	s8.node_type=ASSIGN;	s8.statement_number = 8;
	STMT s9;	s9.node_type=IF;		s9.statement_number = 9;
	STMT s10;	s10.node_type=IF;		s10.statement_number = 10;
	STMT s11;	s11.node_type=WHILE;	s11.statement_number = 11;
	STMT s12;	s12.node_type=ASSIGN;	s12.statement_number = 12;
	STMT s13;	s13.node_type=ASSIGN;	s13.statement_number = 13;
	STMT s14;	s14.node_type=ASSIGN;	s14.statement_number = 14;
	STMT s15;	s15.node_type=ASSIGN;	s15.statement_number = 15;
	STMT s16;	s16.node_type=ASSIGN;	s16.statement_number = 16;

	parent.InsertParent(s1,s2);
	parent.InsertParent(s1,s7);
	parent.InsertParent(s2,s3);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s4,s5);
	parent.InsertParent(s4,s6);
	parent.InsertParent(s2,s4);
	parent.InsertParent(s7,s8);
	parent.InsertParent(s7,s9);
	parent.InsertParent(s9,s10);
	parent.InsertParent(s9,s15);
	parent.InsertParent(s9,s16);
	parent.InsertParent(s10,s11);
	parent.InsertParent(s10,s14);
	parent.InsertParent(s11,s12);
	parent.InsertParent(s11,s13);


	int in_array[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
	//int in_array2[] = {10,11,12,13,14,15,16,17,18,19,20};
	std::vector<INTEGER> in (in_array, in_array + sizeof(in_array) / sizeof(INTEGER) );
	//std::vector<INTEGER> in2 (in_array2, in_array2 + sizeof(in_array2) / sizeof(INTEGER) );
	std::vector<std::vector<INTEGER>> out = parent.RetrieveParent(in,in);

	/*
	cout << "Parent(s1,s2)" << 
		out[0].size() << ", " << out[1].size() << endl;

	unsigned int i;
	for (i = 0; i < out[0].size() ; i++)
	{
		cout << out[0][i] << ", " << out[1][i] << endl;
	}
	

	CPPUNIT_ASSERT(out[0][0]==1 && out[1][0]==2);
	CPPUNIT_ASSERT(out[0][1]==1 && out[1][1]==7);
	CPPUNIT_ASSERT(out[0][2]==2 && out[1][2]==3);
	CPPUNIT_ASSERT(out[0][3]==2 && out[1][3]==4);
	CPPUNIT_ASSERT(out[0][4]==4 && out[1][4]==5);
	CPPUNIT_ASSERT(out[0][5]==4 && out[1][5]==6);
	CPPUNIT_ASSERT(out[0][6]==7 && out[1][6]==8);
	CPPUNIT_ASSERT(out[0][7]==7 && out[1][7]==9);
	CPPUNIT_ASSERT(out[0][8]==9 && out[1][8]==10);
	CPPUNIT_ASSERT(out[0][9]==9 && out[1][9]==15);
	CPPUNIT_ASSERT(out[0][10]==9 && out[1][10]==16);
	CPPUNIT_ASSERT(out[0][11]==10 && out[1][11]==11);
	CPPUNIT_ASSERT(out[0][12]==10 && out[1][12]==14);
	CPPUNIT_ASSERT(out[0][13]==11 && out[1][13]==12);
	CPPUNIT_ASSERT(out[0][14]==11 && out[1][14]==13);
}
*/

#endif